#include<iostream>
#include<cstring>
#include<cmath>
#include<string>
#include<queue>
using namespace std;
typedef long long LL;
priority_queue<int>q;
int n;
int main()
{
	int a, b;
	cin >> a >> b;
	LL a1 = 0, a2 = 0;
	int k = 0;
	while (a) {
		a1 += a % 2 * pow(10, k);
		k++;
		a /= 2;
	}
	k = 0;
	while (b) {
		a2 += b % 2 * pow(10, k);
		k++;
		b /= 2;
	}
	LL sum = a1 + a2;
	cout << sum << endl;
	return 0;
}